package com.relytosoft.mizar.media.common.entity.pojo.dto;

import com.relytosoft.mizar.media.common.entity.pojo.request.btdl.common.BtdlStatusReq;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author wss
 * @version 1.0
 * @date 2022/5/31 15:14
 */

public class TaskStatusDto {

    @ApiModelProperty("任务id")
    private String taskId;

    @ApiModelProperty("算法类型")
    private String algorithmType;

    @ApiModelProperty("code值")
    private int code;

    @ApiModelProperty("消息")
    private String msg;

    public static TaskStatusDto buildDto(BtdlStatusReq btdlStatusReq) {
        TaskStatusDto taskStatusDto = new TaskStatusDto();
        taskStatusDto.setTaskId(btdlStatusReq.getTaskId());
        taskStatusDto.setAlgorithmType(btdlStatusReq.getAlgorithmType());
        taskStatusDto.setCode(btdlStatusReq.getCode());
        taskStatusDto.setMsg(btdlStatusReq.getMsg());
        return taskStatusDto;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getAlgorithmType() {
        return algorithmType;
    }

    public void setAlgorithmType(String algorithmType) {
        this.algorithmType = algorithmType;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "TaskStatusDto{" +
                "taskId='" + taskId + '\'' +
                ", algorithmType='" + algorithmType + '\'' +
                ", code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
